package com.wiscamp.ninechapters.problems.enums;

/**
 * 问题模式
 */
public enum QuestionModes {
    /*
    判断问题模式
     */
    TRUE_FALSE(121001, "判断问题模式"),

    /*
    单项选择问题模式
     */
    MULTIPLE_CHOICE_TWO_OPTIONS(121002, "单项选择问题模式-两选项"),
    MULTIPLE_CHOICE_THREE_OPTIONS(121003, "单项选择问题模式-三选项"),
    MULTIPLE_CHOICE_FOUR_OPTIONS(121004, "单项选择问题模式-四选项"),
    MULTIPLE_CHOICE_FIVE_OPTIONS(121005, "单项选择问题模式-五选项"),

    /*
    多项选择问题模式
     */
    MULTIPLE_SELECTION_FOUR_OPTIONS(121006, "多项选择问题模式-四选项"),
    MULTIPLE_SELECTION_FIVE_OPTIONS(121007, "多项选择问题模式-五选项"),
    MULTIPLE_SELECTION_SIX_OPTIONS(121008, "多项选择问题模式-六选项"),
    MULTIPLE_SELECTION_SEVEN_OPTIONS(121009, "多项选择问题模式-七选项"),


    /*
    计算问题模式，答案为单结果数值
    整数、商及余数、
    分数、通分分数、
    有限小数、循环小数、
    百分数、
    根数、
    有理数
     */
    CALCULATION_NUMBER(121010, "计算问题模式-数值"),

    /*
    填空问题模式，答案为纯文本
     */
    CALCULATION_EXPRESSION(121011, "计算问题模式-表达式"),

    /*
    填空问题模式，答案为数值
    整数、商及余数、
    分数、通分分数、
    有限小数、循环小数、
    百分数、
    根数、
    有理数
    */
    COMPLETION_NUMBER(121012, "填空问题模式-数值"),

    /*
    填空问题模式，答案为范围
     */
    COMPLETION_RANGE(121013, "填空问题模式-范围"),

    /*
    填空问题模式，答案为算术运算表达式
    */
    //COMPLETION_ARITHMETIC_EXPRESSION(121014, "填空问题模式-算术运算表达式"),

    /*
    填空问题模式，答案为算术运算等式
    */
    //COMPLETION_ARITHMETIC_EQUATION(121015, "填空问题模式-算术运算等式"),

    /*
    填空问题模式，答案为算术运算不等式
    */
    //COMPLETION_ARITHMETIC_INEQUALITY(121016, "填空问题模式-算术运算不等式"),

    /*
    填空问题模式，答案为含变量的算术运算表达式
    */
    //COMPLETION_ARITHMETIC_EXPRESSION_WITH_VARIANT(121017, "填空问题模式-含变量算术运算表达式"),

    /*
    填空问题模式，答案为含变量的算术运算等式
    */
    //COMPLETION_ARITHMETIC_EQUATION_WITH_VARIANT(121018, "填空问题模式-含变量算术运算等式"),

    /*
    填空问题模式，答案为含变量的算术运算不等式
    */
    //COMPLETION_ARITHMETIC_INEQUALITY_WITH_VARIANT(121019, "填空问题模式-含变量算术运算不等式"),

    /*
    填空问题模式，答案为时间
    */
    //COMPLETION_TIME(121020, "填空问题模式-时间"),

    /*
    填空问题模式，答案为日期
    */
    //COMPLETION_DATE(121021, "填空问题模式-日期"),

    /*
    填空问题模式，答案为日期时间
    */
    COMPLETION_DATETIME(121022, "填空问题模式-日期时间"),

    /*
    填空问题模式，答案为计量单位、货币单位
    */
    COMPLETION_UNIT(121023, "填空问题模式-单位"),

    /**
     * 填空问题模式，答案为LATEX表示的通用数学式子
     */
    COMPLETION_SENTENCE(121024, "填空问题模式-通用数学式"),

    /**
     * 填空问题模式，答案为无序数列
     */
    COMPLETION_NUMBER_SERIES(121025, "填空问题模式-无序数列"),

    /**
     * 填空问题模式，答案为排序数列
     */
    //COMPLETION_SORTED_SERIES(121026, "填空问题模式-排序数列"),

    /**
     * 填空问题模式，答案为运算符
     * 比较运算符、算术运算符
     */
    COMPLETION_OPERATOR(121027, "填空问题模式-运算符"),

    /**
     *
     */
    COMPLETION_TEXT(121028, "填空问题模式-纯文本"),

    /**
     *
     */
    RATION_PROPORTION_RATIO(121029, "比与比例模式-比"),

    /**
     *
     */
    RATION_PROPORTION_PROPORTION(121030, "比与比例模式-比例"),

    /**
     * 结果位小数或分数的latex文本
     */
    RATION_PROPORTION_RATE(121031, "比与比例模式-比值"),

    /**
     *
     */
    STATISTICS_AVERAGE(121032, "统计问题模式-平均数"),

    /**
     *
     */
    STATISTICS_MEDIAN(121033, "统计问题模式-中位数"),

    /**
     * 一道问题中多项填空，答案类型有多种
     */
    COMPLETION_HYBRID(121034, "填空问题模式-混合答案类型"),

    FACTORS_MULTIPLES(121035, "因数倍数问题模式-因数问题"),
    COMMON_FACTOR_MULTIPLE(121036, "因数倍数问题模式-最大公因子问题"),
    //FACTORS_AND_MULTIPLES_MULTIPLES(121037, "因数倍数问题模式-倍数问题"),
    //FACTORS_AND_MULTIPLES_MIN_MULTIPLE(121038, "因数倍数问题模式-最小公倍数问题"),

    PROBABILITY_CALCULATION(121039, "概率问题模式-计算概率"),

    GEOMETRY_CALCULATION_ANGLE_DEGREE(121040, "几何计算问题模式-角度问题"),
    GEOMETRY_CALCULATION_EDGE_PERIMETER(121041, "几何计算问题模式-边长周长问题"),
    //GEOMETRY_CALCULATION_PERIMETER(121042, "几何计算问题模式-周长问题"),
    GEOMETRY_CALCULATION_AREA(121043, "几何计算问题模式-面积问题"),
    GEOMETRY_CALCULATION_VOLUME_CAPACITY(121044, "几何计算问题模式-体积容积问题"),

    COLUMN_CALCULATION_PLUS(121045, "列式计算问题模式-加法"),
    COLUMN_CALCULATION_MINUS(121046, "列式计算问题模式-减法"),
    COLUMN_CALCULATION_TIMES(121047, "列式计算问题模式-乘法"),
    COLUMN_CALCULATION_DIVISION(121048, "列式计算问题模式-除法"),

    UNIT_CONVERSION_MEASURE(121049, "单位转换问题模式-计量单位转换"),
    UNIT_CONVERSION_MONEY(121050, "单位转换问题模式-货币转换"),

    COMPLETION_LATEX(121051, "填空问题模式-Latex文本"),

    GEOMETRY_COMPLETION_EDGE_ANGLE(121052, "几何填空问题模式-边角的表示"),
    // GEOMETRY_COMPLETION_ANGLE(121053, "几何填空问题模式-角的表示"),
    GEOMETRY_COMPLETION_POLYGON(121054, "几何填空问题模式-多边形的表示"),
    //GEOMETRY_COMPLETION_ANGLE_ANGLE(121055, "几何填空问题模式-边角关系"),
    GEOMETRY_COMPLETION_ANGLE_EDGE_RELATION(121056, "几何填空问题模式-角边关系"),
    //GEOMETRY_COMPLETION_EDGE_EDGE(121057, "几何填空问题模式-边与边关系"),

    WORD(121058, "文字应用问题模式"),

    FORMULA_SOLVE_EQUATION(121059, "解方程不等式问题模式-解等式方程"),
    FORMULA_SOLVE_INEQUALITY(121060, "解方程不等式问题模式-解不等式"),
    //FORMULA_EQUATION_1VARIABLE_2POWER(121061, "解方程不等式问题模式-一元二次不等式"),
    //FORMULA_EQUATION_2VARIABLE_1POWER(121062, "解方程不等式问题模式-二元一次不等式"),

    PROVE(121063, "推理证明问题模式"),

    COMPLETION_DECIMAL_RANGE(121064, "填空问题模式-小数范围"),

    SHORT_ANSWER(121065, "解答问题模式");

    private final int value;

    private final String name;

    QuestionModes(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static QuestionModes valueOf(int value) {
        return switch (value) {
            case 121001 -> QuestionModes.TRUE_FALSE;
            case 121002 -> QuestionModes.MULTIPLE_CHOICE_TWO_OPTIONS;
            case 121003 -> QuestionModes.MULTIPLE_CHOICE_THREE_OPTIONS;
            case 121004 -> QuestionModes.MULTIPLE_CHOICE_FOUR_OPTIONS;
            case 121005 -> QuestionModes.MULTIPLE_CHOICE_FIVE_OPTIONS;
            case 121006 -> QuestionModes.MULTIPLE_SELECTION_FOUR_OPTIONS;
            case 121007 -> QuestionModes.MULTIPLE_SELECTION_FIVE_OPTIONS;
            case 121008 -> QuestionModes.MULTIPLE_SELECTION_SIX_OPTIONS;
            case 121009 -> QuestionModes.MULTIPLE_SELECTION_SEVEN_OPTIONS;
            case 121010 -> QuestionModes.CALCULATION_NUMBER;
            case 121011 -> QuestionModes.CALCULATION_EXPRESSION;
            case 121012 -> QuestionModes.COMPLETION_NUMBER;
            case 121013 -> QuestionModes.COMPLETION_RANGE;
            /*case 121014:
                return QuestionModeEnum.COMPLETION_ARITHMETIC_EXPRESSION;
            case 121015:
                return QuestionModeEnum.COMPLETION_ARITHMETIC_EQUATION;
            case 121016:
                return QuestionModeEnum.COMPLETION_ARITHMETIC_INEQUALITY;
            case 121017:
                return QuestionModeEnum.COMPLETION_ARITHMETIC_EXPRESSION_WITH_VARIANT;
            case 121018:
                return QuestionModeEnum.COMPLETION_ARITHMETIC_EQUATION_WITH_VARIANT;
            case 121019:
                return QuestionModeEnum.COMPLETION_ARITHMETIC_INEQUALITY_WITH_VARIANT;
            case 121020:
                return QuestionModeEnum.COMPLETION_TIME;
            case 121021:
                return QuestionModeEnum.COMPLETION_DATE;*/
            case 121022 -> QuestionModes.COMPLETION_DATETIME;
            case 121023 -> QuestionModes.COMPLETION_UNIT;
            case 121024 -> QuestionModes.COMPLETION_SENTENCE;
            case 121025 -> QuestionModes.COMPLETION_NUMBER_SERIES;
            //case 121026:
            //    return QuestionModeEnum.COMPLETION_SORTED_SERIES;
            case 121027 -> QuestionModes.COMPLETION_OPERATOR;
            case 121028 -> QuestionModes.COMPLETION_TEXT;
            case 121029 -> QuestionModes.RATION_PROPORTION_RATIO;
            case 121030 -> QuestionModes.RATION_PROPORTION_PROPORTION;
            case 121031 -> QuestionModes.RATION_PROPORTION_RATE;
            case 121032 -> QuestionModes.STATISTICS_AVERAGE;
            case 121033 -> QuestionModes.STATISTICS_MEDIAN;
            case 121034 -> QuestionModes.COMPLETION_HYBRID;
            case 121035 -> QuestionModes.FACTORS_MULTIPLES;
            case 121036 -> QuestionModes.COMMON_FACTOR_MULTIPLE;
/*            case 121037:
                return QuestionModeEnum.FACTORS_AND_MULTIPLES_MULTIPLES;
            case 121038:
                return QuestionModeEnum.FACTORS_AND_MULTIPLES_MIN_MULTIPLE;*/
            case 121039 -> QuestionModes.PROBABILITY_CALCULATION;
            case 121040 -> QuestionModes.GEOMETRY_CALCULATION_ANGLE_DEGREE;
            case 121041 -> QuestionModes.GEOMETRY_CALCULATION_EDGE_PERIMETER;
            //case 121042:
            //    return QuestionModeEnum.GEOMETRY_CALCULATION_PERIMETER;
            case 121043 -> QuestionModes.GEOMETRY_CALCULATION_AREA;
            case 121044 -> QuestionModes.GEOMETRY_CALCULATION_VOLUME_CAPACITY;
            case 121045 -> QuestionModes.COLUMN_CALCULATION_PLUS;
            case 121046 -> QuestionModes.COLUMN_CALCULATION_MINUS;
            case 121047 -> QuestionModes.COLUMN_CALCULATION_TIMES;
            case 121048 -> QuestionModes.COLUMN_CALCULATION_DIVISION;
            case 121049 -> QuestionModes.UNIT_CONVERSION_MEASURE;
            case 121050 -> QuestionModes.UNIT_CONVERSION_MONEY;
            case 121051 -> QuestionModes.COMPLETION_LATEX;
            case 121052 -> QuestionModes.GEOMETRY_COMPLETION_EDGE_ANGLE;
            //case 121053:
            //   return QuestionModeEnum.GEOMETRY_COMPLETION_ANGLE;
            case 121054 -> QuestionModes.GEOMETRY_COMPLETION_POLYGON;
            //case 121055:
            //    return QuestionModeEnum.GEOMETRY_COMPLETION_ANGLE_ANGLE;
            case 121056 -> QuestionModes.GEOMETRY_COMPLETION_ANGLE_EDGE_RELATION;
            //case 121057:
            //    return QuestionModeEnum.GEOMETRY_COMPLETION_EDGE_EDGE;
            case 121058 -> QuestionModes.WORD;
            case 121059 -> QuestionModes.FORMULA_SOLVE_EQUATION;
            case 121060 -> QuestionModes.FORMULA_SOLVE_INEQUALITY;
            //case 121061:
            //    return QuestionModeEnum.FORMULA_EQUATION_1VARIABLE_2POWER;
            //case 121062:
            //    return QuestionModeEnum.FORMULA_EQUATION_2VARIABLE_1POWER;
            case 121063 -> QuestionModes.PROVE;
            case 121064 -> QuestionModes.COMPLETION_DECIMAL_RANGE;
            case 121065 -> QuestionModes.SHORT_ANSWER;
            default -> null;
        };
    }
}
